#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <queue>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#ifndef TEST
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, int> piii;

// fast input
inline ll read() {
    ll X = 0, w = 0;
    char ch = 0;
    while (!isdigit(ch)) {
        w |= ch == '-';
        ch = getchar();
    }
    while (isdigit(ch))
        X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
    return w ? -X : X;
}

// fast output
inline void write(ll x) {
    if (x < 0)
        putchar('-'), x = -x;
    if (x > 9)
        write(x / 10);
    putchar(x % 10 + '0');
}

#define pb push_back
#define mp make_pair
namespace eratosthenes {
    vector<bool> prime_bool(int n) {
        vector<bool> p(n + 1, true);
        for (int i = 2; i <= n / i; i++) {
            if (p[i]) {
                for (int j = i * i; j <= n; j += i) {
                    p[j] = false;
                }
            }
        }
        p[0] = p[1] = false;
        return p;
    }

    vector<int> prime_vector(int n) {
        vector<bool> p = prime_bool(n);
        vector<int> prs;
        for (int i = 2; i <= n; i++) {
            if (p[i]) {
                prs.push_back(i);
            }
        }
        return prs;
    }
} // namespace eratosthenes
auto pr = eratosthenes::prime_vector(31627);

void solve() {
    ll n = read();
    ll ans = 0;
    for (ll i : pr) {
        if (i * i * i * i <= n) {
            ans++;
        }
    }
    write(ans);
    putchar('\n');
}

int32_t main() {
    int t = 1;
    while (t--) {
        solve();
    }
}